#include "contigdatapacket.h"

ContigDataPacket::ContigDataPacket(QString contigId, QObject *parent) :
    contigId(contigId), QObject(parent)
{
    length = 0;
}

QString ContigDataPacket::getContigId()
{
   return contigId;
}

void ContigDataPacket::addGenomeElement(QPointer<GenomeElementDataPacket> p)
{
    genomeElementDataPackets << p ;

    if( p->getStop() > length )
        length = p->getStop();
}

int ContigDataPacket::numOfGenomeElements()
{
    return genomeElementDataPackets.size();
}

GenomeElementDataPacket* ContigDataPacket::getGenomeElementDataPacket( int i )
{
    return genomeElementDataPackets[i];
}
